Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Allow inline structs in function registration #30

Merged
merged 3 commits into from
Nov 2, 2024

Conversation

nadeesha
Copy link
Contributor

@nadeesha nadeesha commented Nov 2, 2024

Due to an error in how we're doing Reflect.(Type), an inline struct as a function argument was thorwing a panic.

testFunc := func(input struct {
  A int `json:"a"`
  B int `json:"b"`
}) int {
  return input.A + input.B
}

// panic: failed to find schema definition for

@nadeesha nadeesha force-pushed the nadeesha/improve-error-handling-mq78 branch from 7f6b3d5 to cb79abc Compare November 2, 2024 04:11
@nadeesha nadeesha marked this pull request as ready for review November 2, 2024 04:11
@nadeesha nadeesha merged commit 8c60d3c into main Nov 2, 2024
9 checks passed
@nadeesha nadeesha deleted the nadeesha/improve-error-handling-mq78 branch November 2, 2024 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant